package com.ruoyi.lightkillPest.domain.aliyun;


import com.alibaba.fastjson2.annotation.JSONField;
import com.ruoyi.traplight.domain.aliyun.DeviceProperties;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;
import java.util.List;

@Data
@Accessors(chain = true)
public class SCDDeviceProperties {
    /**
     * 设备编号
     */
    @JSONField(serialize = false)
    private Integer deviceId;

    /**
     * 物联网卡号
     */
    @JSONField(serialize = false)
    private Long iotNum;

    /**
     * 物联网卡有效日期
     */
    @JSONField(serialize = false)
    private Date validationDate;

    /**
     * 设备名称
     */
    @JSONField(serialize = false)
    private String deviceName;

    /**
     * 版本号
     */
    @JSONField(serialize = false)
    private String version;

    /**
     * 剩余流量
     */
    @JSONField(serialize = false)
    private Integer dateLeft;

    @JSONField(name ="ProductInfo",serialize = false)
    private ProductInfo productInfo;

    @JSONField(name = "WorkMode")
    private Integer workMode;

    @JSONField(serialize = false)
    private String workModeTime;

    @JSONField(name = "GeoLocation",serialize = false)
    private GeoLocation geoLocation;

    @JSONField(name = "TimeModeSet")
    private List<TimeModeSet> timeModeSet;

    @JSONField(name = "WarnSet")
    private WarnSet warnSet;

    @JSONField(name ="BatteryPercentage",serialize = false)
    private Double batteryPercentage;

    @JSONField(name ="SignalStrength",serialize = false)
    private Integer signalStrength;

    @JSONField(name ="GSMState",serialize = false)
    private Integer GSMState;

    @Data
    public static class ProductInfo{
        @JSONField(name ="DeviceId",ordinal = 1)
        private String deviceId;
        @JSONField(name ="DeviceName",ordinal = 2)
        private String deviceName;
        @JSONField(name ="IotNum",ordinal = 3)
        private Long iotNum;
        @JSONField(name ="ValidationDate",ordinal = 4)
        private Date validationDate;
        @JSONField(name ="DateLeft",ordinal = 5)
        private Integer dateLeft;
    }
    @Data
    public static class GeoLocation{
        @JSONField(name = "Latitude",ordinal = 1)
        private double latitude;
        @JSONField(name = "Longitude",ordinal = 2)
        private double longitude;
    }
    @Data
    public static class TimeModeSet{
        @JSONField(name = "SlotStartTime",ordinal = 1)
        private int slotStartTime;
        @JSONField(name = "SlotEndTime",ordinal = 2)
        private int slotEndTime;
        @JSONField(name = "SlotEnable",ordinal = 3)
        private int slotEnable;
    }
    @Data
    public static class WarnSet{
        @JSONField(name = "BatteryWarn",ordinal = 1)
        private double batteryWarn;
        @JSONField(name = "LongitudeWarn",ordinal = 2)
        private double longitudeWarn;
        @JSONField(name = "LatitudeWarn",ordinal = 3)
        private double latitudeWarn;
    }
}
